Skip to main content

ampersand

Type​

operator

Summary​

Concatenates two strings.

Syntax​

<string1> & <string2>

Description​

Use the & operator to create a single string out of two or more parts. That is, string2 is appended immediately after string1 with no intervening space.

Parameters​

NameTypeDescription

string1

string

A literal string of characters (delimited with double quotes), or expressions that evaluate to strings.

string2

string

A literal string of characters (delimited with double quotes), or expressions that evaluate to strings.

Examples​

put "foo" & "bar" -- evaluates to "foobar"
local myVar, otherVar
put myVar & quote & "hello" & quote into otherVar
local theData
get offset(return & space, theData)

function: offset

glossary: character, concatenate, delimit, double quote, evaluate, expression, literal string, operator, string

constant: quote, return

Compatibility and Support​

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

web

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?